package com.xy.core.annotation;

import org.springframework.context.annotation.Conditional;

import java.lang.annotation.*;

/**
 * 替换@ConditionalOnExpression("#{environment['etl.name'].indexOf('cczzPlcServer')>=0}")
 * 同样实现,这样更简洁
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.METHOD})
@Documented
@Conditional(OnConditionalEtl.class)
public @interface ConditionalOnEtl {

    String key() default "etl.name";

    String value() default "defaultServer";
}
